{extend name="admin/public:layout" /}
{block name="title"}管理员管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 管理员管理</a></li>
                <li class="active">添加管理员</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">管理用户名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入管理用户名"
                               name="admin_name" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">用户密码</label>
                    <div class="col-sm-4">
                        <input type="password" class="form-control" placeholder="请输入用户密码"
                               name="admin_pass" value="" datatype="*"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">真实姓名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入管理用户名"
                               name="admin_truename" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">所属部门</label>
                    <div class="col-sm-4">
                        <select name="dept_id" class="form-control" datatype="*">
                            <option value="0">请选择部门</option>
                            {volist name="deptList" id="vo"}
                            {gt name="adminInfo.admin_power" value="1"}
                            {eq name="adminInfo.dept_id" value="$vo.dept_id"}
                            <option value="{$vo.dept_id}">{$vo.dept_name}</option>
                            {/eq}
                            {else}
                            <option value="{$vo.dept_id}" {eq name="info.admin_power" value="1"}selected{/eq}>{$vo.dept_name}</option>
                            {/gt}
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">所属角色</label>
                    <div class="col-sm-4">
                        <select name="admin_power" class="form-control" datatype="*">
                            {eq name="adminInfo.admin_power" value="1"}
                            <option value="1">超级管理员</option>
                            <option value="2">部门管理员</option>
                            <option value="3">圈子管理员</option>
                            {/eq}
                            {eq name="adminInfo.admin_power" value="2"}
                            <option value="2">部门管理员</option>
                            <option value="3">圈子管理员</option>
                            {/eq}
                            {eq name="adminInfo.admin_power" value="3"}
                            <option value="3">圈子管理员</option>
                            {/eq}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}